/* 
* ---------------------------------------------------------------------
* Copyright (c) 2014, 2015 All Right Reserved
* This software is developed for study and improve.
* 
* Project:  Excellent Coder < EC >
* 
* ecPlatformDepType.h
*
* This file for redefing all the C++ basic types.
*
* Eamil:  epengao@126.com
* Author: Peter Gao
* Version: Initial first version.
* --------------------------------------------------------------------
*/

#ifndef EC_PLATFORM_DEP_TYPE_H
#define EC_PLATFORM_DEP_TYPE_H

#ifdef __cplusplus
extern "C" {
#endif

namespace ec {

/* signed type */
typedef char                  _CHAR;
typedef short                 _SHORT;
typedef int                   _S32;
typedef long                  _LONG;
typedef long long             _S64;
typedef float                 _FLOAT;
typedef double                _DOUBLE;
typedef long double           _LONG_DOUBLE;
typedef wchar_t               _WCHAR;

/* unsigned type */
typedef unsigned char         _U8;
typedef unsigned short        _U16;
typedef unsigned int          _U32;
typedef unsigned long long    _U64;

/* bool */
typedef bool                  _BOOL;
#define _FALSE                0
#define _TRUE                 (!_FALSE)

/* pointer */
typedef void*                 _POINTER;
#define _NULL                 0

/* max define */
#define _MAX_U8               0xFF
#define _MAX_U16              0xFFFF
#define _MAX_U32              0xFFFFFFFF
#define _MAX_U64              0xFFFFFFFFFFFFFFFF

/* debug break */
#define _DEBUG_BREAK          (__asm int 3);
} /* namespace ec */
#ifdef __cplusplus
}
#endif

#endif /* EC_PLATFORM_DEP_TYPE_H */
